import 'package:json_annotation/json_annotation.dart';

part 'news_bean.g.dart';

@JsonSerializable()
class NewsBean {
  String summary;
  String createTime;
  String author;
  String headPic;
  String title;
  String content;
  String videoUrl;
  String id;
  String labelId;
  int click;
  int good;
  int hasVideo;
  int isTop;
  int comment;
  int sn;
  int status;

  NewsBean(
      {this.summary,
      this.createTime,
      this.author,
      this.headPic,
      this.title,
      this.content,
      this.videoUrl,
      this.id,
      this.labelId,
      this.click,
      this.good,
      this.hasVideo,
      this.isTop,
      this.comment,
      this.sn,
      this.status});

  NewsBean.fromJson(Map<String, dynamic> json) {
    this.summary = json['summary'];
    this.createTime = json['create_time'];
    this.author = json['author'];
    this.headPic = json['head_pic'];
    this.title = json['title'];
    this.content = json['content'];
    this.videoUrl = json['video_url'];
    this.id = json['id'];
    this.labelId = json['label_id'];
    this.click = json['click'];
    this.good = json['good'];
    this.hasVideo = json['has_video'];
    this.isTop = json['is_top'];
    this.comment = json['comment'];
    this.sn = json['sn'];
    this.status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['summary'] = this.summary;
    data['create_time'] = this.createTime;
    data['author'] = this.author;
    data['head_pic'] = this.headPic;
    data['title'] = this.title;
    data['content'] = this.content;
    data['video_url'] = this.videoUrl;
    data['id'] = this.id;
    data['label_id'] = this.labelId;
    data['click'] = this.click;
    data['good'] = this.good;
    data['has_video'] = this.hasVideo;
    data['is_top'] = this.isTop;
    data['comment'] = this.comment;
    data['sn'] = this.sn;
    data['status'] = this.status;
    return data;
  }
}
